<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { useSystemInfo, getCurrentLocation } from "@/store";
import { reWxLogin } from "@/utils";

// 小程序初始化事件
onLaunch(async () => {
  // 0. 获取用于登陆状态
  reWxLogin();
  // 1. 获取用户设备信息
  const systemInfo = useSystemInfo();
  systemInfo.setSystemInfo();
  // 2. 获取当前位置信息
  getCurrentLocation()
  console.log("App Launch");
});
onShow(() => {
  console.log("App Show");
});
onHide(() => {
  console.log("App Hide");
});


</script>
<style>
page {
  background-color: #f5f5f5;
}
</style>
